home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / program / 615 / resvmall / resvmall.lst < prev   
Encoding:
File List  |  1992-09-27  |  1.1 KB  |  27 lines

  1. ' **************************************
  2. ' ***  Public Domain by Kevin Mason  ***
  3. ' ***    GFA Basic 3.5  26 Jun 92    ***
  4. ' ***      Reserve / Malloc demo     ***
  5. ' **************************************
  6. '
  7. LPRINT "Command","Memory","Comments"
  8. LPRINT
  9. LPRINT "FRE(0)",FRE(0),"start total memory available to GFA"
  10. LPRINT "MALLOC(-1)",MALLOC(-1),"start total memory for SYSTEM"
  11. RESERVE 8000
  12. LPRINT "RESERVE 8000",,"Reduce GFA memory to ~8000 bytes"
  13. LPRINT "FRE(0)",FRE(0),"New available GFA memory"
  14. LPRINT "MALLOC(-1)",MALLOC(-1),"Total memory released to SYSTEM"
  15. DIM a%(200)
  16. LPRINT "DIM a%(200)",,"make INT array in GFA memory (4*200 bytes)"
  17. LPRINT "FRE(0)",FRE(0),"GFA memory still available"
  18. LPRINT "MALLOC(-1)",MALLOC(-1),"SYSTEM memory remains untouched"
  19. memblock_adr1%=MALLOC(32256)
  20. LPRINT "adr%=MALLOC(32256)","make block SYSTEM memory of ~32K"
  21. LPRINT "FRE(0)",FRE(0),"GFA memory remains untouched"
  22. LPRINT "MALLOC(-1)",MALLOC(-1),"New total SYSTEM memory now available"
  23. ~MFREE(memblock_adr1%)
  24. RESERVE
  25. LPRINT "MFREE(adr%)",,"undo Malloc"
  26. LPRINT "RESERVE",,"undo Reserve"
  27.